/**
 * <p>Project: Components</p>
 * <p>Package: com.patac.hmi.ui.corepage.util</p>
 * <p>File: CollectionUtils.java</p>
 *
 * <p>Date: 2016/8/11/11:27.</p>
 */
package com.pactera.asmp.server.common.logprint.utils;

import java.util.Collection;
import java.util.Map;


/**
 * <p>Class: com.patac.hmi.ui.corepage.util.CollectionUtils</p>
 * <p>Description:</p>
 * <pre>
 *     Collection utils
 * </pre>
 *
 * @author baojianming
 * @date 2016/8/11/11:27
 */

public class CollectionUtils {

    private CollectionUtils(){}

    public static boolean isEmpty(Collection<?> coll) {
        return null == coll || coll.isEmpty();
    }

    public static boolean isNotEmpty(Collection<?> coll) {
        return !isEmpty(coll);
    }

    public static boolean isMapEmpty(Map<?, ?> map) {
        return map == null || map.size() == 0;
    }

    public static boolean isMapNotEmpty(Map<?, ?> map) {
        return !isMapEmpty(map);
    }

    public static boolean isArrayEmpty(Object[] objs) {
        return objs == null || objs.length == 0;
    }

    public static boolean isArrayNotEmpty(Object[] objs) {
        return !isArrayEmpty(objs);
    }

}
